package com.eliota.controller;

import com.eliota.common.R;
import com.eliota.controller.dto.ProjectDto;
import com.eliota.entity.Project;
import com.eliota.entity.ProjectUser;
import com.eliota.service.ProjectUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author MG
 * @since 2023-04-01
 */
@RestController
@RequestMapping("/project-user")
public class ProjectUserController {

    @Resource
    private ProjectUserService projectUserService;


    @PostMapping("/save")
    public R addUser(@RequestBody ProjectDto projectDto){

        projectUserService.addUser(projectDto);
        return R.success();
    }
}
